#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
int t, n, ans, x;
const int N = 200005;
int a[N];
int main(){
	cin >> t;
	while(t--){
		memset(a, 0, (N + 1) * 4);
		cin >> n;
		for (int i = 0; i < n; i++){
			cin >> x;
			if (x <= n) a[x]++;
		}
		for (int i = n; )
		
		sort(a, a + N + 1);
		cout << a[N] << endl;
		
	}

    return 0;
}


